package cn.wit.tech.service.impl;

import cn.wit.tech.mapper.ProjectHistoryInfoMapper;
import cn.wit.utils.pojo.CurriculumHistoryInfo;
import cn.wit.utils.pojo.ProjectDataAnalyze;
import cn.wit.utils.pojo.ProjectHistoryInfo;
import cn.wit.tech.service.ProjectHistoryInfoService;
import cn.wit.utils.response.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class ProjectHistoryInfoServiceImpl implements ProjectHistoryInfoService {
    @Autowired
    private ProjectHistoryInfoMapper projectHistoryInfoMapper;

    @Override
    public Result getProjectHistoryInfo() {
        List<ProjectDataAnalyze> projectHistoryInfo = projectHistoryInfoMapper.getProjectHistoryInfo();
        if (CollectionUtils.isEmpty(projectHistoryInfo)) {
            return Result.ok(new ArrayList<>());
        }
        return Result.ok(projectHistoryInfo);
    }
}
